package cc.cix.gt.org.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author cix
 */
@Data
@ApiModel(value = "Menu对象", description = "菜单")
@TableName("t_menu")
public class Menu implements Serializable {

    private static long serialVersionUID = 7187628714679791771L;

    /**
     * 菜单类型：菜单
     */
    public static String TYPE_MENU = "0";
    /**
     * 菜单类型：按钮
     */
    public static String TYPE_BUTTON = "1";

    /**
     * 顶级菜单
     */
    public static Long TOP_MENU_ID = 0L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("菜单ID")
    private Long id;

    @ApiModelProperty("上级菜单ID")
    private Long parentId;

    @ApiModelProperty("菜单/按钮名称")
    private String menuName;

    @ApiModelProperty("菜单URL")
    private String path;

    @ApiModelProperty("权限标识")
    private String perms;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("类型: 0=菜单，1=按钮")
    private String type;

    @ApiModelProperty("排序")
    private Integer orderNum;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

}
